﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FrienDev.BusinessRules;

public partial class home_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (ApiHelper.Instance.IsFriendsPage())
        {
            if (!ApiHelper.Instance.IsVisible(UserRules.Instance.GetCurrentUserId(), ApiHelper.Instance.GetRequestUserId(), "DefaultPage"))
            {
                pn_RecentVisitorList.Visible = false;
                pn_Track.Visible = false;
            }
            if(!ApiHelper.Instance.IsVisible(UserRules.Instance.GetCurrentUserId(), ApiHelper.Instance.GetRequestUserId(), "RecentVistList"))
            {
                pn_RecentVisitorList.Visible = false;
            }
            if (!ApiHelper.Instance.IsVisible(UserRules.Instance.GetCurrentUserId(), ApiHelper.Instance.GetRequestUserId(), "Track"))
            {
                pn_Track.Visible = false;
            }
        }
    }
}
